# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-oscrypto
_pkgname=oscrypto
pkgver=1.2.1
pkgrel=2
pkgdesc='TLS (SSL) sockets, key generation, encryption, decryption, signing, verification and KDFs using the OS crypto libraries.'
arch=('any')
url='https://pypi.org/project/oscrypto/#files'
license=('MIT')
depends=('python2' 'python2-asn1crypto')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('5c2229bafe8ba3666a557b592d4ca640318c7775bd201966e3ba3afb4e15fc4960143fd39409843c0ce455b40299d98cc4f4460636bf7ae51015be4f8f525a22')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --prefix=/usr --root="$pkgdir" -O1 --skip-build
}

